package com.ruoyi.dl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dl.mapper.DlOrdersCxlogMapper;
import com.ruoyi.dl.domain.DlOrdersCxlog;
import com.ruoyi.dl.service.IDlOrdersCxlogService;
import com.ruoyi.common.core.text.Convert;

/**
 * 撤销订单记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-01-09
 */
@Service
public class DlOrdersCxlogServiceImpl implements IDlOrdersCxlogService 
{
    @Autowired
    private DlOrdersCxlogMapper dlOrdersCxlogMapper;

    /**
     * 查询撤销订单记录
     * 
     * @param id 撤销订单记录ID
     * @return 撤销订单记录
     */
    @Override
    public DlOrdersCxlog selectDlOrdersCxlogById(Integer id)
    {
        return dlOrdersCxlogMapper.selectDlOrdersCxlogById(id);
    }

    /**
     * 查询撤销订单记录列表
     * 
     * @param dlOrdersCxlog 撤销订单记录
     * @return 撤销订单记录
     */
    @Override
    public List<DlOrdersCxlog> selectDlOrdersCxlogList(DlOrdersCxlog dlOrdersCxlog)
    {
        return dlOrdersCxlogMapper.selectDlOrdersCxlogList(dlOrdersCxlog);
    }

    /**
     * 新增撤销订单记录
     * 
     * @param dlOrdersCxlog 撤销订单记录
     * @return 结果
     */
    @Override
    public int insertDlOrdersCxlog(DlOrdersCxlog dlOrdersCxlog)
    {
        dlOrdersCxlog.setCreateTime(DateUtils.getNowDate());
        return dlOrdersCxlogMapper.insertDlOrdersCxlog(dlOrdersCxlog);
    }

    /**
     * 修改撤销订单记录
     * 
     * @param dlOrdersCxlog 撤销订单记录
     * @return 结果
     */
    @Override
    public int updateDlOrdersCxlog(DlOrdersCxlog dlOrdersCxlog)
    {
        return dlOrdersCxlogMapper.updateDlOrdersCxlog(dlOrdersCxlog);
    }

    /**
     * 删除撤销订单记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDlOrdersCxlogByIds(String ids)
    {
        return dlOrdersCxlogMapper.deleteDlOrdersCxlogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除撤销订单记录信息
     * 
     * @param id 撤销订单记录ID
     * @return 结果
     */
    @Override
    public int deleteDlOrdersCxlogById(Integer id)
    {
        return dlOrdersCxlogMapper.deleteDlOrdersCxlogById(id);
    }
    /**
     * 审核撤销订单记录对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int updateshDlOrdersCxlogByIds(String ids,String flag)
    {
        return dlOrdersCxlogMapper.updateshDlOrdersCxlogByIds(Convert.toStrArray(ids),flag);
    }
}
